package lab02.Test18;

/**
 * Created by Administrator on 2017/11/17.
 */
public class Test18 {
    public static void main(String[] args) {
        String words = "My name is Network crazy";

        System.out.println("字符串长度：" + words.length());
        System.out.println("第一个字符" + words.charAt(0));
        System.out.println("最后一个字符：" + words.charAt(words.length() - 1));
        String[] word = words.split(" ");
        System.out.println("第一个单词：" + word[0]);
        System.out.println("crazy位置：" + words.indexOf("crazy"));

    }
}
